Skip to content

Configure docstub and add type hints for forest_plot#429

Open
PiyushPanwarFST wants to merge 1 commit intoarviz-devs:mainfrom
PiyushPanwarFST:setup-docstub
Open

Configure docstub and add type hints for forest_plot#429
PiyushPanwarFST wants to merge 1 commit intoarviz-devs:mainfrom
PiyushPanwarFST:setup-docstub

Conversation

@PiyushPanwarFST
Copy link
Contributor

Address issue #84

Description

This PR sets up docstub for arviz-plots and add type hints for forest_plot.py

  • Added docstub.toml for type mappings (aligned with arviz-base).

  • Updated ci_probs type from float, float) to array-like of shape (2,) as per recommendation.

  • Added the generated forest_plot.pyi stub file.

  • Actually, I noticed some curly quotes were causing parsing issues for docstub, so I replaced them with straight quotes. Could you please let me know if this is required or if I should change it back ?

For verification I created a file and confirmed that the IDE autocomplete/hover functionality works correctly with the new stub. Please have a look in the screenshot.

PHOTO-2026-02-16-09-29-15

closes #84

* Add docstub.toml for type mappings

* Fix smart quotes in docstrings

* Update ci_probs from (float, float) to array-like of shape (2,)

* Add generated forest_plot.pyi file

Signed-off-by: PiyushPanwarFST <piyush2002panwar@gmail.com>
@read-the-docs-community
Copy link

Documentation build overview

📚 arviz-plots | 🛠️ Build #31428645 | 📁 Comparing 0ead567 against latest (f79e625)


🔍 Preview build

Show files changed (106 files in total): 📝 106 modified | ➕ 0 added | ➖ 0 deleted
File Status
gallery/add_reference_bands.html 📝 modified
gallery/add_reference_lines.html 📝 modified
gallery/combine_plots.html 📝 modified
gallery/plot_autocorr.html 📝 modified
gallery/plot_bf.html 📝 modified
gallery/plot_compare.html 📝 modified
gallery/plot_convergence_dist.html 📝 modified
gallery/plot_dgof.html 📝 modified
gallery/plot_dgof_dist.html 📝 modified
gallery/plot_dist_ecdf.html 📝 modified
gallery/plot_dist_hist.html 📝 modified
gallery/plot_dist_kde.html 📝 modified
gallery/plot_dist_models.html 📝 modified
gallery/plot_dist_qds.html 📝 modified
gallery/plot_ecdf_coverage.html 📝 modified
gallery/plot_ecdf_pit.html 📝 modified
gallery/plot_energy.html 📝 modified
gallery/plot_ess_evolution.html 📝 modified
gallery/plot_ess_local.html 📝 modified
gallery/plot_ess_models.html 📝 modified
gallery/plot_ess_quantile.html 📝 modified
gallery/plot_forest.html 📝 modified
gallery/plot_forest_ess.html 📝 modified
gallery/plot_forest_models.html 📝 modified
gallery/plot_forest_pp_obs.html 📝 modified
gallery/plot_forest_shade.html 📝 modified
gallery/plot_khat.html 📝 modified
gallery/plot_khat_aesthetics.html 📝 modified
gallery/plot_khat_facet_cols.html 📝 modified
gallery/plot_khat_facet_grid.html 📝 modified
gallery/plot_loo_pit.html 📝 modified
gallery/plot_mcse.html 📝 modified
gallery/plot_pair.html 📝 modified
gallery/plot_pair_distribution.html 📝 modified
gallery/plot_pair_focus.html 📝 modified
gallery/plot_pair_focus_distribution.html 📝 modified
gallery/plot_parallel.html 📝 modified
gallery/plot_pava_calibration.html 📝 modified
gallery/plot_ppc_censored.html 📝 modified
gallery/plot_ppc_coverage.html 📝 modified
gallery/plot_ppc_dist.html 📝 modified
gallery/plot_ppc_interval.html 📝 modified
gallery/plot_ppc_pava_residuals.html 📝 modified
gallery/plot_ppc_pit.html 📝 modified
gallery/plot_ppc_rootogram.html 📝 modified
gallery/plot_ppc_tstat.html 📝 modified
gallery/plot_prior_posterior.html 📝 modified
gallery/plot_psense.html 📝 modified
gallery/plot_psense_quantities.html 📝 modified
gallery/plot_rank.html 📝 modified
gallery/plot_rank_dist.html 📝 modified
gallery/plot_ridge.html 📝 modified
gallery/plot_ridge_multiple.html 📝 modified
gallery/plot_trace.html 📝 modified
gallery/plot_trace_dist.html 📝 modified
tutorials/compose_own_plot.html 📝 modified
tutorials/intro_to_plotcollection.html 📝 modified
tutorials/plots_intro.html 📝 modified
api/generated/arviz_plots.PlotCollection.generate_aes_dt.html 📝 modified
api/generated/arviz_plots.PlotCollection.get_aes_as_dataset.html 📝 modified
api/generated/arviz_plots.PlotCollection.grid.html 📝 modified
api/generated/arviz_plots.PlotCollection.html 📝 modified
api/generated/arviz_plots.PlotCollection.map.html 📝 modified
api/generated/arviz_plots.PlotCollection.update_aes_from_dataset.html 📝 modified
api/generated/arviz_plots.PlotCollection.wrap.html 📝 modified
api/generated/arviz_plots.PlotMatrix.html 📝 modified
api/generated/arviz_plots.PlotMatrix.map.html 📝 modified
api/generated/arviz_plots.PlotMatrix.map_col.html 📝 modified
api/generated/arviz_plots.PlotMatrix.map_row.html 📝 modified
api/generated/arviz_plots.PlotMatrix.map_triangle.html 📝 modified
api/generated/arviz_plots.combine_plots.html 📝 modified
api/generated/arviz_plots.plot_autocorr.html 📝 modified
api/generated/arviz_plots.plot_bf.html 📝 modified
api/generated/arviz_plots.plot_convergence_dist.html 📝 modified
api/generated/arviz_plots.plot_dgof.html 📝 modified
api/generated/arviz_plots.plot_dgof_dist.html 📝 modified
api/generated/arviz_plots.plot_dist.html 📝 modified
api/generated/arviz_plots.plot_ecdf_pit.html 📝 modified
api/generated/arviz_plots.plot_energy.html 📝 modified
api/generated/arviz_plots.plot_ess.html 📝 modified
api/generated/arviz_plots.plot_ess_evolution.html 📝 modified
api/generated/arviz_plots.plot_forest.html 📝 modified
api/generated/arviz_plots.plot_lm.html 📝 modified
api/generated/arviz_plots.plot_loo_pit.html 📝 modified
api/generated/arviz_plots.plot_mcse.html 📝 modified
api/generated/arviz_plots.plot_pair.html 📝 modified
api/generated/arviz_plots.plot_pair_focus.html 📝 modified
api/generated/arviz_plots.plot_parallel.html 📝 modified
api/generated/arviz_plots.plot_ppc_censored.html 📝 modified
api/generated/arviz_plots.plot_ppc_dist.html 📝 modified
api/generated/arviz_plots.plot_ppc_interval.html 📝 modified
api/generated/arviz_plots.plot_ppc_pava.html 📝 modified
api/generated/arviz_plots.plot_ppc_pava_residuals.html 📝 modified
api/generated/arviz_plots.plot_ppc_pit.html 📝 modified
api/generated/arviz_plots.plot_ppc_rootogram.html 📝 modified
api/generated/arviz_plots.plot_ppc_tstat.html 📝 modified
api/generated/arviz_plots.plot_prior_posterior.html 📝 modified
api/generated/arviz_plots.plot_psense_dist.html 📝 modified
api/generated/arviz_plots.plot_psense_quantities.html 📝 modified
api/generated/arviz_plots.plot_rank.html 📝 modified
api/generated/arviz_plots.plot_rank_dist.html 📝 modified
api/generated/arviz_plots.plot_ridge.html 📝 modified
api/generated/arviz_plots.plot_trace.html 📝 modified
api/generated/arviz_plots.plot_trace_dist.html 📝 modified
api/generated/arviz_plots.visuals.multiple_lines.html 📝 modified
_modules/arviz_plots/plots/forest_plot.html 📝 modified

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.23%. Comparing base (f79e625) to head (0ead567).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #429   +/-   ##
=======================================
  Coverage   85.23%   85.23%           
=======================================
  Files          59       59           
  Lines        6934     6934           
=======================================
  Hits         5910     5910           
  Misses       1024     1024           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

type hints

2 participants